3.84 \(\int \frac{A+B x^2}{x^4 \left (a+b x^2\right )^2} \, dx\)

Optimal. Leaf size=90 \[ \frac{\sqrt{b} (5 A b-3 a B) \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )}{2 a^{7/2}}+\frac{b x (A b-a B)}{2 a^3 \left (a+b x^2\right )}+\frac{2 A b-a B}{a^3 x}-\frac{A}{3 a^2 x^3} \]

[Out]

-A/(3*a^2*x^3) + (2*A*b - a*B)/(a^3*x) + (b*(A*b - a*B)*x)/(2*a^3*(a + b*x^2)) +
 (Sqrt[b]*(5*A*b - 3*a*B)*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/(2*a^(7/2))

_______________________________________________________________________________________

Rubi [A]  time = 0.262274, antiderivative size = 90, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.15 \[ \frac{\sqrt{b} (5 A b-3 a B) \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )}{2 a^{7/2}}+\frac{b x (A b-a B)}{2 a^3 \left (a+b x^2\right )}+\frac{2 A b-a B}{a^3 x}-\frac{A}{3 a^2 x^3} \]

Antiderivative was successfully verified.

[In]  Int[(A + B*x^2)/(x^4*(a + b*x^2)^2),x]

[Out]

-A/(3*a^2*x^3) + (2*A*b - a*B)/(a^3*x) + (b*(A*b - a*B)*x)/(2*a^3*(a + b*x^2)) +
 (Sqrt[b]*(5*A*b - 3*a*B)*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/(2*a^(7/2))

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 40.404, size = 80, normalized size = 0.89 \[ - \frac{A}{3 a^{2} x^{3}} + \frac{b x \left (A b - B a\right )}{2 a^{3} \left (a + b x^{2}\right )} + \frac{2 A b - B a}{a^{3} x} + \frac{\sqrt{b} \left (5 A b - 3 B a\right ) \operatorname{atan}{\left (\frac{\sqrt{b} x}{\sqrt{a}} \right )}}{2 a^{\frac{7}{2}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((B*x**2+A)/x**4/(b*x**2+a)**2,x)

[Out]

-A/(3*a**2*x**3) + b*x*(A*b - B*a)/(2*a**3*(a + b*x**2)) + (2*A*b - B*a)/(a**3*x
) + sqrt(b)*(5*A*b - 3*B*a)*atan(sqrt(b)*x/sqrt(a))/(2*a**(7/2))

_______________________________________________________________________________________

Mathematica [A]  time = 0.132887, size = 90, normalized size = 1. \[ -\frac{\sqrt{b} (3 a B-5 A b) \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )}{2 a^{7/2}}-\frac{b x (a B-A b)}{2 a^3 \left (a+b x^2\right )}+\frac{2 A b-a B}{a^3 x}-\frac{A}{3 a^2 x^3} \]

Antiderivative was successfully verified.

[In]  Integrate[(A + B*x^2)/(x^4*(a + b*x^2)^2),x]

[Out]

-A/(3*a^2*x^3) + (2*A*b - a*B)/(a^3*x) - (b*(-(A*b) + a*B)*x)/(2*a^3*(a + b*x^2)
) - (Sqrt[b]*(-5*A*b + 3*a*B)*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/(2*a^(7/2))

_______________________________________________________________________________________

Maple [A]  time = 0.017, size = 110, normalized size = 1.2 \[ -{\frac{A}{3\,{a}^{2}{x}^{3}}}+2\,{\frac{Ab}{{a}^{3}x}}-{\frac{B}{{a}^{2}x}}+{\frac{Ax{b}^{2}}{2\,{a}^{3} \left ( b{x}^{2}+a \right ) }}-{\frac{bBx}{2\,{a}^{2} \left ( b{x}^{2}+a \right ) }}+{\frac{5\,{b}^{2}A}{2\,{a}^{3}}\arctan \left ({bx{\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}}-{\frac{3\,Bb}{2\,{a}^{2}}\arctan \left ({bx{\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((B*x^2+A)/x^4/(b*x^2+a)^2,x)

[Out]

-1/3*A/a^2/x^3+2/a^3/x*A*b-1/a^2/x*B+1/2/a^3*b^2*x/(b*x^2+a)*A-1/2/a^2*b*x/(b*x^
2+a)*B+5/2/a^3*b^2/(a*b)^(1/2)*arctan(x*b/(a*b)^(1/2))*A-3/2/a^2*b/(a*b)^(1/2)*a
rctan(x*b/(a*b)^(1/2))*B

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x^2 + A)/((b*x^2 + a)^2*x^4),x, algorithm="maxima")

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

Fricas [A]  time = 0.222186, size = 1, normalized size = 0.01 \[ \left [-\frac{6 \,{\left (3 \, B a b - 5 \, A b^{2}\right )} x^{4} + 4 \, A a^{2} + 4 \,{\left (3 \, B a^{2} - 5 \, A a b\right )} x^{2} + 3 \,{\left ({\left (3 \, B a b - 5 \, A b^{2}\right )} x^{5} +{\left (3 \, B a^{2} - 5 \, A a b\right )} x^{3}\right )} \sqrt{-\frac{b}{a}} \log \left (\frac{b x^{2} + 2 \, a x \sqrt{-\frac{b}{a}} - a}{b x^{2} + a}\right )}{12 \,{\left (a^{3} b x^{5} + a^{4} x^{3}\right )}}, -\frac{3 \,{\left (3 \, B a b - 5 \, A b^{2}\right )} x^{4} + 2 \, A a^{2} + 2 \,{\left (3 \, B a^{2} - 5 \, A a b\right )} x^{2} + 3 \,{\left ({\left (3 \, B a b - 5 \, A b^{2}\right )} x^{5} +{\left (3 \, B a^{2} - 5 \, A a b\right )} x^{3}\right )} \sqrt{\frac{b}{a}} \arctan \left (\frac{b x}{a \sqrt{\frac{b}{a}}}\right )}{6 \,{\left (a^{3} b x^{5} + a^{4} x^{3}\right )}}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x^2 + A)/((b*x^2 + a)^2*x^4),x, algorithm="fricas")

[Out]

[-1/12*(6*(3*B*a*b - 5*A*b^2)*x^4 + 4*A*a^2 + 4*(3*B*a^2 - 5*A*a*b)*x^2 + 3*((3*
B*a*b - 5*A*b^2)*x^5 + (3*B*a^2 - 5*A*a*b)*x^3)*sqrt(-b/a)*log((b*x^2 + 2*a*x*sq
rt(-b/a) - a)/(b*x^2 + a)))/(a^3*b*x^5 + a^4*x^3), -1/6*(3*(3*B*a*b - 5*A*b^2)*x
^4 + 2*A*a^2 + 2*(3*B*a^2 - 5*A*a*b)*x^2 + 3*((3*B*a*b - 5*A*b^2)*x^5 + (3*B*a^2
 - 5*A*a*b)*x^3)*sqrt(b/a)*arctan(b*x/(a*sqrt(b/a))))/(a^3*b*x^5 + a^4*x^3)]

_______________________________________________________________________________________

Sympy [A]  time = 3.17059, size = 184, normalized size = 2.04 \[ \frac{\sqrt{- \frac{b}{a^{7}}} \left (- 5 A b + 3 B a\right ) \log{\left (- \frac{a^{4} \sqrt{- \frac{b}{a^{7}}} \left (- 5 A b + 3 B a\right )}{- 5 A b^{2} + 3 B a b} + x \right )}}{4} - \frac{\sqrt{- \frac{b}{a^{7}}} \left (- 5 A b + 3 B a\right ) \log{\left (\frac{a^{4} \sqrt{- \frac{b}{a^{7}}} \left (- 5 A b + 3 B a\right )}{- 5 A b^{2} + 3 B a b} + x \right )}}{4} - \frac{2 A a^{2} + x^{4} \left (- 15 A b^{2} + 9 B a b\right ) + x^{2} \left (- 10 A a b + 6 B a^{2}\right )}{6 a^{4} x^{3} + 6 a^{3} b x^{5}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x**2+A)/x**4/(b*x**2+a)**2,x)

[Out]

sqrt(-b/a**7)*(-5*A*b + 3*B*a)*log(-a**4*sqrt(-b/a**7)*(-5*A*b + 3*B*a)/(-5*A*b*
*2 + 3*B*a*b) + x)/4 - sqrt(-b/a**7)*(-5*A*b + 3*B*a)*log(a**4*sqrt(-b/a**7)*(-5
*A*b + 3*B*a)/(-5*A*b**2 + 3*B*a*b) + x)/4 - (2*A*a**2 + x**4*(-15*A*b**2 + 9*B*
a*b) + x**2*(-10*A*a*b + 6*B*a**2))/(6*a**4*x**3 + 6*a**3*b*x**5)

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.230397, size = 115, normalized size = 1.28 \[ -\frac{{\left (3 \, B a b - 5 \, A b^{2}\right )} \arctan \left (\frac{b x}{\sqrt{a b}}\right )}{2 \, \sqrt{a b} a^{3}} - \frac{B a b x - A b^{2} x}{2 \,{\left (b x^{2} + a\right )} a^{3}} - \frac{3 \, B a x^{2} - 6 \, A b x^{2} + A a}{3 \, a^{3} x^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x^2 + A)/((b*x^2 + a)^2*x^4),x, algorithm="giac")

[Out]

-1/2*(3*B*a*b - 5*A*b^2)*arctan(b*x/sqrt(a*b))/(sqrt(a*b)*a^3) - 1/2*(B*a*b*x -
A*b^2*x)/((b*x^2 + a)*a^3) - 1/3*(3*B*a*x^2 - 6*A*b*x^2 + A*a)/(a^3*x^3)